const path = require("path");
const webpack = require("webpack");
const {
    CleanWebpackPlugin
} = require("clean-webpack-plugin");

module.exports = {
    mode: "development",
    entry: {
        dll: ["react", "react-dom"],
    },
    output: {
        filename: "[name].js",
        path: path.resolve(__dirname, "dist"),
        library: "_dll",
    },
    plugins: [
        new CleanWebpackPlugin(),
        new webpack.DllPlugin({
            name: "_dll",
            path: path.resolve(__dirname, "dist", "manifest.json"),
        }),
    ],
};